import axios from 'axios';

/**
 * 获取记录详情
 * @param {string} recordID - 记录的 ID
 * @returns {Promise<object>} - 返回记录详情数据
 */
export const getRecordDetail = async (recordID) => {
  try {
    const response = await axios.get(`http://127.0.0.1:4523/m1/5546336-5223294-default/data/record/${recordID}`);
    return response.data; // 返回记录详情数据
  } catch (error) {
    console.error('获取记录详情失败:', error);
    throw error; // 抛出错误以便组件处理
  }
};